Package-level declarations

Classes to collect payments.

Types

Link copied to clipboard

Information about the card used in a purchase.

Link copied to clipboard
sealed class CardPaymentDetails

Details about a successful card payment.

Link copied to clipboard
class CashPaymentDetails(val buyerSuppliedMoney: Money, val changeBackMoney: Money)

Details about a successful cash payment.

Link copied to clipboard

Represents a currency. Currencies are identified by their ISO 4217 currency codes.

Link copied to clipboard

Actions possible when an authorized payment is neither canceled nor completed in time.

Link copied to clipboard
class DigitalWalletDetails(val walletBrand: WalletBrand?, val buyerId: String?)
Link copied to clipboard
class ExternalPaymentDetails(val type: String, val source: String, val sourceId: String? = null, val sourceFeeMoney: Money? = null)

Holder class for external payment data.

Link copied to clipboard
class Money(val amount: Long, val currencyCode: CurrencyCode)

A representation of a specific amount of money.

Link copied to clipboard

A queue of offline payments taken on this device that have not yet been uploaded to the Square server.

Link copied to clipboard
sealed class Payment

The description of a completed payment, returned in the success value of Payment Result. All currency amounts are specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents.

Link copied to clipboard

Error conditions that arise during payments. Like other categories of error codes, these are separated between "usage errors" which a careful developer could and should have avoided, and regular errors which cannot be prevented during normal operation. For example, NOT_AUTHORIZED is not a usage error, because user might be force-logged out during payment process and server will then return error 401. However, developers should be checking that Mobile Payments SDK has been authorized and, if not, disabling the controls that lead to a call to PaymentManager.startPaymentActivity; TIMEOUT is a regular, non-usage error because network conditions are unpredictable and might be severed in the middle of a transaction; even with the best of developers' care, timeouts sometimes just happen.

Link copied to clipboard
interface PaymentHandle

Representation of a payment process available immediately from PaymentManager.startPaymentActivity. Provides a way to interact with an ongoing payment, e.g. cancel it or select additionalPaymentMethods. Additionally, one can get idempotencyKey of the payment that was just created.

Link copied to clipboard
interface PaymentManager

Processes payments for Mobile Payments SDK.

Link copied to clipboard

Parameters to describe a single payment made using Mobile Payments SDK. Use Builder to create and configure payment parameters, for example:

Link copied to clipboard
class PaymentProcessingFee(val effectiveAt: Date, val type: PaymentProcessingFee.Type, val amountMoney: Money)

Processing fees and fee adjustments assessed by Square on this payment.

Link copied to clipboard
data class PaymentSettings(val isOfflineProcessingAllowed: Boolean, val offlineTransactionAmountLimit: Money?, val offlineTotalStoredAmountLimit: Money?)

Read-only settings that provide payment settings based on the current authenticated seller.

Link copied to clipboard

PaymentParameters "processingMode" parameter will determine whether the current payment needs to be processed online or offline.

Link copied to clipboard

Specifies whether to display the DEFAULT Square-provided payment prompt UI or a CUSTOM UI provided by the developer.

Link copied to clipboard
class PromptParameters(val mode: PromptMode = PromptMode.DEFAULT, val additionalPaymentMethods: List<<Error class: unknown class>> = AdditionalPaymentMethod.allPaymentMethods)

Parameters for configuring the payment prompt UI. Includes:

Link copied to clipboard
class SquareAccountDetails(val paymentSourceToken: String, val errors: List<ErrorDetails>?)

Details about a Square Account Payment.

Link copied to clipboard